package com.unknown.common.util;

import android.util.Log;

public class LogUtils {
    private static final String arrow = " -> ";
    private static final String dot = ".";

//    public static void v(String format, Object... args) {
//        Log.v(getTag(), StringUtils.concat(Thread.currentThread(), arrow, String.format(format, args)));
//    }

    public static void d(String format, Object... args) {
        Log.d(getTag(), StringUtils.concat(Thread.currentThread(), arrow, String.format(format, args)));
    }

    public static void i(String format, Object... args) {
        Log.i(getTag(), StringUtils.concat(Thread.currentThread(), arrow, String.format(format, args)));
    }

//    public static void w(String format, Object... args) {
//        Log.w(getTag(), StringUtils.concat(Thread.currentThread(), arrow, String.format(format, args)));
//    }

    public static void e(String format, Object... args) {
        Log.e(getTag(), StringUtils.concat(Thread.currentThread(), arrow, String.format(format, args)));
    }

    private static String getTag() {
        StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[4];
        return StringUtils.concat(stackTraceElement.getClassName(), dot, stackTraceElement.getMethodName());
    }
}
